// @ts-ignore
/* eslint-disable */
import request from '@/request/http'

/** 删除知识库 删除知识库 POST /ai/anyUser/delete */
export async function deleteUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.RSaSession>(`/ai/ai/anyUser/delete`, {
    method: 'POST',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 知识库列表 知识库列表 GET /ai/anyUser/list */
export async function list1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.list1Params,
  options?: { [key: string]: any }
) {
  return request<API.RSaSession>(`/ai/ai/anyUser/list`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 编辑知识库 编辑知识库 POST /ai/library/edit */
export async function edit(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.editParams,
  options?: { [key: string]: any }
) {
  return request<API.RSaSession>(`/ai/ai/library/edit`, {
    method: 'POST',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 修改 修改UpdateVO中不为空的字段 PUT /aiLibrary */
export async function update1(body: API.AiLibraryUpdateVO, options?: { [key: string]: any }) {
  return request<API.RAiLibrary>(`/ai/aiLibrary`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 新增 POST /aiLibrary */
export async function save1(body: API.AiLibrarySaveVO, options?: { [key: string]: any }) {
  return request<API.RAiLibrary>(`/ai/aiLibrary`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 删除 DELETE /aiLibrary */
export async function delete2(body: number[], options?: { [key: string]: any }) {
  return request<API.RBoolean>(`/ai/aiLibrary`, {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 单体查询 单体查询 GET /aiLibrary/${param0} */
export async function get1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.get1Params,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.RAiLibraryResultVO>(`/ai/aiLibrary/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {})
  })
}

/** 检测知识库名称是否可用 GET /aiLibrary/check */
export async function check(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.checkParams,
  options?: { [key: string]: any }
) {
  return request<API.RBoolean>(`/ai/aiLibrary/check`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 复制 POST /aiLibrary/copy */
export async function copy1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.copy1Params,
  options?: { [key: string]: any }
) {
  return request<API.RAiLibrary>(`/ai/aiLibrary/copy`, {
    method: 'POST',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 查询单体详情 GET /aiLibrary/detail */
export async function getDetail1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getDetail1Params,
  options?: { [key: string]: any }
) {
  return request<API.RAiLibraryResultVO>(`/ai/aiLibrary/detail`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 根据Id批量查询 根据Id批量查询 POST /aiLibrary/findByIds */
export async function findByIds1(body: number[], options?: { [key: string]: any }) {
  return request<API.RListAiLibraryResultVO>(`/ai/aiLibrary/findByIds`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 分页列表查询 POST /aiLibrary/page */
export async function page1(
  body: API.PageParamsAiLibraryPageQuery,
  options?: { [key: string]: any }
) {
  return request<API.RIPageAiLibraryResultVO>(`/ai/aiLibrary/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 分页查询知识库信息 分页查询知识库信息 POST /aiLibrary/pageDetail */
export async function pageDetail(
  body: API.PageParamsAiLibraryPageQuery,
  options?: { [key: string]: any }
) {
  return request<API.RIPageAiLibraryResultVO>(`/ai/aiLibrary/pageDetail`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 批量查询 批量查询 POST /aiLibrary/query */
export async function query1(body: API.AiLibraryPageQuery, options?: { [key: string]: any }) {
  return request<API.RListAiLibraryResultVO>(`/ai/aiLibrary/query`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}
